<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
 ! Excerpted from "Mastering Dojo",
 ! published by The Pragmatic Bookshelf.
 ! Copyrights apply to this code. It may not be used to create training material, 
 ! courses, books, articles, and the like. Contact us if you are in doubt.
 ! We make no guarantees that this code is fit for any purpose. 
 ! Visit http://www.pragmaticprogrammer.com/titles/rgdojo for more book information.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cell Editors</title>
    <style type="text/css">
        @import "/dojoroot/dijit/themes/tundra/tundra.css";
        @import "/dojoroot/dojox/grid/_grid/Grid.css";
        @import "/dojoroot/dojox/widget/Rating/Rating.css"; 
        @import "/dojoroot/dojox/grid/_grid/tundraGrid.css";
        
        body {
            font-size: 0.9em;
            font-family: Geneva, Arial, Helvetica, sans-serif;
        }
        .heading {
            font-weight: bold;
            padding-bottom: 0.25em;
        }
                
        #grid { 
            border: 1px solid #333;
            width: 35em;
            height: 15em;
        }
    </style>
    <script type="text/javascript" src="/dojoroot/dojo/dojo.js"  
            djConfig="parseOnLoad: true,isDebug:true"></script>
    
    <script type="text/javascript">
       dojo.registerModulePath("dojobook","../../dojobook");
       dojo.require("dojox.grid.Grid");
       dojo.require("dojobook.grid.grid_definitions.editors");
       dojo.require("dojo.data.ItemFileWriteStore");
       dojo.require("dojox.widget.Rating");
    </script>
</head>
<body class="tundra">
    
    <span dojoType="dojo.data.ItemFileWriteStore" 
        jsId="icStore" url="datastores/ice_cream.json">
        <script type="dojo/connect" event="onSet" 
                args="item,attribute,oldValue,newValue">
            console.debug(attribute+" changed from "+oldValue+" to "+newValue);
        </script>
    </span>
    

    <div id="grid" dojoType="dojox.grid.Grid" 
        store="icStore"
        clientSort="true"
        structure="dojobook.grid.grid_definitions.editors.structure">
        </div>

</body>
